class LoginInfo {
  static UserInfo _userInfo;
  static String _token = "";

  LoginInfo.fromJson(Map<String, dynamic> json) {
    _userInfo =
        json['userInfo'] != null ? UserInfo.fromJson(json['userInfo']) : null;
    _token = json['token'];
  }

  // 访问途径
  static UserInfo get userInfo => _userInfo;

  static String get token => _token;
}

class UserInfo {
  String id;
  int type;
  String username;
  String account;
  String password;
  String email;
  String mobile;
  int status;
  String companyId;
  String remark;
  String createBy;
  int createTime;
  String updateBy;
  int updateTime;
  String companyName;
  String roleName;

  UserInfo(
      {this.id,
      this.type,
      this.username,
      this.account,
      this.password,
      this.email,
      this.mobile,
      this.status,
      this.companyId,
      this.remark,
      this.createBy,
      this.createTime,
      this.updateBy,
      this.updateTime,
      this.companyName,
      this.roleName});

  UserInfo.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    type = json['type'];
    username = json['username'];
    account = json['account'];
    password = json['password'];
    email = json['email'];
    mobile = json['mobile'];
    status = json['status'];
    companyId = json['companyId'];
    remark = json['remark'];
    createBy = json['createBy'];
    createTime = json['createTime'];
    updateBy = json['updateBy'];
    updateTime = json['updateTime'];
    companyName = json['companyName'];
    roleName = json['roleName'];
  }
}
